package com.yehuo.app.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;
import java.util.Date;

/**
 * 敏感词消息
 */
@Data
@TableName("t_sensitive_messages")
public class SensitiveMessage implements Serializable {

    /**
     * 序号
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;


    /**
     * 消息ID
     */
    @TableField(value = "_mid")
    private String mid;

    /**
     * 发送者ID
     */
    @TableField(value = "_from")
    private String sender;

    /**
     * 接收者ID
     */
    @TableField(value = "_target")
    private String target;

    /**
     * 接收者名称
     */
    private transient String recipient;

    /**
     * 消息内容
     */
    @TableField(value = "_searchable_key")
    private String content;

    /**
     * 类型 0=单聊，2=群聊
     */
    @TableField(value = "_type")
    private Integer type;

    /**
     * 创建时间
     */
    @TableField(value = "_dt")
    private Date createTime;
}
